<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    var promise = new Promise(function (resolve, reject) {
        if (true) {
            resolve(value);
        }else{
            reject(error);
        }

    });
</script>
</body>
</html>